<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>用户登录</title>
    <link rel="stylesheet" th:href="@{/css/base.css}" />
    <link rel="stylesheet" th:href="@{/css/login.css}" />
</head>
<body>

<div class="form-container">
    <h2 class="form-title">用户登录</h2>

    <form th:action="@{/user/login}" th:object="${login_user}" method="post">
        <label>用户名</label>
        <input type="text" th:field="*{username}" required />

        <label>密码</label>
        <input type="password" th:field="*{password}" required />

        <button type="submit">登录</button>

        <div th:if="${error}">
            <p th:text="${error}"></p>
        </div>
    </form>

</div>

</body>
</html>
